package com.jdd.modules.mqtt.constant;

/**
 * @className MqttCmd
 * @author: zxl
 * @describe: Mqtt指令集合
 * @date: 2022/9/27/19:30
 * @vision: 1.0
 */
public class MqttCmdConstant {
    public static class CMDType {
        public static final String CREATE_USER = "create_user";
        public static final String DELETE_USER = "delete_user";
    }

    /**
     * 公共指令
     *
     * @author zxl
     * @date 2022/9/28 10:22
     */
    public static final String CMD = "cmd";
    public static final String CMD_ID = "cmd_id";
    public static final String CLIENT_ID = "client_id";
    public static final String BODY = "body";

    /**
     * 机器开门指令集
     *
     * @author zxl
     * @date 2022/9/27 22:59
     */
    public static class DoorController {
        public static final String OPEN_DOOR = "gpio control";
        public static final String CTRL_TYPE = "ctrl_type";
    }

    /**
     * 人员名单指令集
     *
     * @author zxl
     * @date 2022/9/27 23:00
     */
    public static class PeopleController {
        /**
         * 删除名单指令集
         *
         * @author zxl
         * @date 2022/9/27 23:10
         */
        public static class Delete {
            public static final String DELETE_FACE = "delete_face";
            public static final String TYPE = "type";
            public static final String PER_id = "per_id";//0：普通人员。 1：白名单人员。 2：黑名单人员(可选)

            public enum DEL_PERSON_MODE {
                DEL_PERSON_ID(0),//删除指定 ID 人员
                DEL_PERSON_WHITE(1),//删除白名单人员
                DEL_PERSON_BLACK(2),//删除白名单人员
                DEL_PERSON_COMM(3),//删除白名单人员
                DEL_PERSON_ALL(4);//删除所有人员
                int type;

                DEL_PERSON_MODE(int type) {
                    this.type = type;
                }

                public int getType() {
                    return type;
                }
            }
        }

        /**
         * 创建名单指令集
         *
         * @author zxl
         * @date 2022/9/27 23:08
         */
        public static class Create {
            public static final String CREATE_FACE = "create_face";
            public static final String UPDETE_FACE_EX = "update_face_ex";
            public static final String PER_TYPE = "per_type";//0：普通人员。 1：白名单人员。 2：黑名单人员(可选)
            public static final String PER_NAME = "per_name"; //姓名：不超过 10 字节 utf8 编码
            public static final String PER_id = "per_id";//人员 id：不超过 32 位
            public static final String FACE_ID = "face_id"; //人脸 ID（不填则自动生成）(可选)
            public static final String IDCAEDNUM = "idcardNum";//韦根号,智能卡号(可选)
            public static final String IMG_DATE = "img_data";//base64
            public static final String IDCAEDPER = "idcardper";//身份证号：18 位(可选)
            public static final String S_TIME = "s_time"; //启用日期时间戳(可选)
            public static final String E_TIME = "e_time"; //有效日期时间戳(可选)
            public static final String USER_TYPE = "usr_type"; //权限类型，取值 0 - 5，默认 0(可选)
            public static final String URL = "url"; //查询的图片 url
            public static final String IMG_URL = "img_url"; //创建时的img_url
        }

        /**
         * 查询名单指令集
         *
         * @author zxl
         * @date 2022/9/27 23:08
         */
        public static class Query {
            public static final String QUERY_FACE = "query_face";//创建人员指令
            public static final String PER_ID = "per_id";
            public static final String NAME = "name";
            public static final String ID = "id";
        }

        /**
         * 修改名单指令集
         *
         * @author zxl
         * @date 2022/9/27 23:10
         */
        public static class Update {
            public static final String UPDATE_FACE = "update_face";
            public static final String PER_TYPE = "per_type";//0：普通人员。 1：白名单人员。 2：黑名单人员(可选)
            public static final String PER_NAME = "per_name";//0：普通人员。 1：白名单人员。 2：黑名单人员(可选)
            public static final String PER_id = "per_id";//0：普通人员。 1：白名单人员。 2：黑名单人员(可选)
            public static final String FACE_ID = "face_id";//0：普通人员。 1：白名单人员。 2：黑名单人员(可选)
            public static final String IDCAEDNUM = "idcardNum";//韦根号,智能卡号(可选)
            public static final String IMG_DATE = "img_data";//base64
            public static final String IDCAEDPER = "idcardper";//身份证号：18 位(可选)
            public static final String S_TIME = "s_time"; //启用日期时间戳(可选)
            public static final String E_TIME = "e_time"; //有效日期时间戳(可选)
            public static final String USER_TYPE = "usr_type"; //权限类型，取值 0 - 5，默认 0(可选)
        }
    }

    public static class VoiceController {
        //        通过提示音 success.wav
//        失败提示音 failure.wav
//        请重刷身份证 reswipeidcard.wav
//        权限已过期 deadline.wav
//        开机语音 welcome.wav
//        未带安全帽禁止通行 hatpass.wav
//        未在有效时段 outtime.wav
        public static final String SUCCESS = "success.wav";
        public static final String FAILURE = "failure.wav";
        public static final String RESWIPEIDVAED = "reswipeidcard.wav";
        public static final String DEALINE = "deadline.wav";
        public static final String WELCOME = "welcome.wav";
        public static final String HATPASS = "hatpass.wav";
        public static final String OUTTIME = "outtime.wav";

        public static final String BODY = "body";
        public static final String FILE_NAME = "file_name";
        public static final String TRYLISTEN_WAV = "trylisten_wav";


    }

    /**
     * 验证识别模式结果集
     *
     * @author zxl
     * @date 2022/9/28 10:13
     */
    public static class RecoMode {
        public static final String MODE = "mode";
        public static final int MODE0 = 0; //0：刷脸，
        public static final int MODE1 = 1; //1：刷卡
        public static final int MODE2 = 2;//2：刷身份证
        public static final int MODE3 = 3;//3：刷脸+刷卡
        public static final int MODE4 = 4;//4：刷脸+刷身份证
        public static final int MODE5 = 5;//5：刷脸或刷卡
        public static final int MODE6 = 6;//6：刷脸或刷身份证
        public static final int MODE7 = 7;//7：过人开闸
    }


}
